<?php
//echo $javascript->link ( 'jquery' );
echo $html->css ( 'jquery-validate/css/screen' );
?>

<script type="text/javascript">


//添加验证
$(document).ready(function() {
	$.validator.setDefaults({       
		 submitHandler: function(form) {    
		  form.submit();    
		}       
	});   
			
//validate signup form on keyup and submit
$("#ChannelmanageAddchannelmanageForm").validate({
rules: {
"data[Channelmanage][otentosan]": {
required: true,string:true,stringMinLength:0,stringMaxLength:50
},
"data[Channelmanage][companyholename]": {
required: false,string:true,stringMinLength:0,stringMaxLength:50
},
"data[Channelmanage][resumecost]": {
required: false,string:true,stringMinLength:0,stringMaxLength:50
},
"data[Channelmanage][tel]": {
required: false,phone:true
},
"data[Channelmanage][fax]": {
required: false,fax:true
},
"data[Channelmanage][url]": {
required: false,url:true
},
"data[Channelmanage][email]": {
required: false,email:true
},
"data[Channelmanage][address]": {
	required: false,string:true,stringMinLength:0,stringMaxLength:100
	},
	"data[Channelmanage][postcode]": {
	required: false,zipCode:true
	},
	"data[Channelmanage][openingbank]": {
	required: false,string:true,stringMinLength:0,stringMaxLength:50
	},
	"data[Channelmanage][iban]": {
	required: false,number:true,stringMinLength:8,stringMaxLength:50
	},
	"data[Channelmanage][memo]": {
	required: false,stringMinLength:0,stringMaxLength:255
	}
},
messages: {
	
	"data[Channelmanage][iban]": {
	stringMinLength:"银行卡号必须大于8位",stringMaxLength:50
	}
},

focusInvalid:false,
onkeyup:false,
errorPlacement:function(error, element){
	error.appendTo(element.parent());
}
});
});



$(function()
		{
			$("#close").click(function(){		
				window.close();							
			});
		});
</script>

<!-- 当前位置-->
<div id="tabmenubar">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabmenubartitle1"><?php echo  __('YourPosition');//您现在的位置：?></td>
		<td class="tabmenubartitle2"><?php echo __('Channelmanage');//一级目录
										   echo '>';echo __('Channelmanage');//二级目录
										   echo '>';?>
									<?php echo $html->tag('span', __('Channelmanage Add',true));//当前操作地用span加粗?> 						  
		</td>
	</tr>
</table>
</div>
<!-- 当前位置-->
<div class="tabflex">
<fieldset><legend><?php echo __('Channelmanage Add')?></legend>
<?php echo $form->create('Channelmanage',array('action'=>'addchannelmanage','type'=> 'post'));?>
<table width="100%" cellspacing="0" cellpadding="0" border="0"
	style="text-align: left">
		<tr>
		<td width="5%"></td>
		<td width="10%"><?php echo __('ChannelmanageType');//渠道类别?>:</td>
		<td width="35%">
		<?php 
			echo $form->input('channeltype_id',array('options'=>$op2,'label'=>false,'div'=>false,'class'=>'TextBoxE1'));	
		?>
		</td>
		<td width="5%"></td>
		<td width="10%"><?php echo __('Channelmanage company');//公司性质?>:</td>
		<td width="35%">
		<?php 
			echo $form->input('companyproperty',array('options'=>$op1,'label'=>false,'div'=>false,'class'=>'TextBoxE1'));	
		?>
		</td>
		</tr>
		
		<tr>
		<td></td>
		<td><?php echo __('Channelmanage companyshortname');//公司简称?>:<font color="red">*</font></td>
		<td>
		<?php 
			echo $form->input('otentosan',array('label'=>false));
		?>
		</td>
		<td></td>
		<td><?php echo __('Channelmanage companyfullname');//公司全称?>:</td>
		<td>
		<?php 
			echo $form->input('companyholename',array('label'=>false));
		?>
		</td>
		</tr>
		
		<tr>
		<td></td>
		<td><?php echo __('Channelmanage collaborative');//合作关系?>:</td>
		<td>
		<?php 
			echo $form->input('collaborative',array('options'=>$op3,'label'=>false,'div'=>false,'class'=>'TextBoxE1'));	
		?>
		</td>
		<td></td>
		<td><?php echo __('Channelmanage resumecost');//简历成本?>:</td>
		<td>
		<?php 
			echo $form->input('resumecost',array('label'=>false));
		?>
		</td>
		</tr>
		
		<tr>
		<td></td>
		<td><?php echo __('Systemconfigs tel');//联系电话?>:</td>
		<td>
		<?php 
			echo $form->input('tel',array('label'=>false));
		?>
		</td>
		<td></td>
		<td><?php echo __('Systemconfigs fax');//传真?>:</td>
		<td>
		<?php 
			echo $form->input('fax',array('label'=>false));
		?>
		</td>
		</tr>
		<tr>
		<td></td>
		<td><?php echo __('Systemconfigs companyUrl');//公司网站?>:</td>
		<td>
		<?php 
			echo $form->input('url',array('label'=>false));
		?>
		</td>
		<td></td>
		<td><?php echo __('linkmenemail');//电子邮箱?>:</td>
		<td>
		<?php 
			echo $form->input('email',array('label'=>false));
		?>
		</td>
		</tr>
		
		<tr>
		<td></td>
		<td><?php echo __('Address');//公司地址?>:</td>
		<td>
		<?php 
			echo $form->input('address',array('label'=>false));
		?>
		</td>
		<td></td>
		<td><?php echo __('postcode');//邮政编码?>:</td>
		<td>
		<?php 
			echo $form->input('postcode',array('label'=>false));
		?>
		</td>
		</tr>
		
		<tr>
		<td></td>
		<td><?php echo __('openingbank');//开户银行?>:</td>
		<td >
		<?php 
			echo $form->input('openingbank',array('label'=>false));
		?>
		</td>
		<td></td>
		<td><?php echo __('iban');//银行账号?>:</td>
		<td>
		<?php 
			echo $form->input('iban',array('label'=>false));
		?>
		</td>
		</tr>
		
		<tr>
		<td></td>
		<td><?php echo __('Channelmanage memo');//备注?>:</td>
		<td  colspan="4">
		<?php 
			echo $form->textarea('memo',array('label'=>false,'class' => 'TextArea1 txtOut'));
		?>
		</td>
		</tr>
	</table>
</fieldset>

</div>
<table width="100%" cellspacing="0" cellpadding="0" border="0" style="text-align: left">
	<tr>
		<td width="50"></td>
		<td width="100"><?php echo $form->button('确定',array('type'=>'submit','class'=>'oksubmit'));?></td>
		<td width="100"><?php echo $form->button('关闭',array('class'=>'cancelbutton','id'=>'close'));?>  <!-- __('reset', true)取消-->
		</td>
	</tr>
</table>
<?php echo $form->end();?>
		